package com.smartlight.godlight.model;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

public class OrderInfo implements Parcelable {
    // 订单核心信息
    private String orderNo;
    // 客户信息
    private String name;
    private String phone;
    // 佛像信息
    private int buddhaId;
    private String buddhaName;
    private String buddhaImg;
    // 佛灯编号
    private String buddhaNo;
    // 祝福语
    private String blessing;
    // 时长信息
    private int timespanId;
    private String timespanName;
    private int month;
    private long startTime;
    private long endTime;
    private double money;

    public OrderInfo() {

    }

    protected OrderInfo(Parcel in) {
        orderNo = in.readString();
        name = in.readString();
        phone = in.readString();
        buddhaId = in.readInt();
        buddhaName = in.readString();
        buddhaNo = in.readString();
        buddhaImg = in.readString();
        blessing = in.readString();
        timespanId = in.readInt();
        timespanName = in.readString();
        month = in.readInt();
        money = in.readDouble();
        orderStatus = in.readString();
        payStatus = in.readString();
        printStatus = in.readString();
        startTime = in.readLong();
        endTime = in.readLong();
    }

    public static final Creator<OrderInfo> CREATOR = new Creator<OrderInfo>() {
        @Override
        public OrderInfo createFromParcel(Parcel in) {
            return new OrderInfo(in);
        }

        @Override
        public OrderInfo[] newArray(int size) {
            return new OrderInfo[size];
        }
    };


    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    // 订单状态
    private String orderStatus;
    private String payStatus;
    private String printStatus;

    public String getOrderNo() {
        return orderNo;
    }

    public String getName() {
        return name;
    }

    public String getBuddhaImg() {
        return buddhaImg;
    }

    public void setBuddhaImg(String buddhaImg) {
        this.buddhaImg = buddhaImg;
    }

    public String getPhone() {
        return phone;
    }

    public int getBuddhaId() {
        return buddhaId;
    }

    public String getBuddhaName() {
        return buddhaName;
    }

    public String getBuddhaNo() {
        return buddhaNo;
    }

    public String getBlessing() {
        return blessing;
    }

    public int getTimespanId() {
        return timespanId;
    }

    public String getTimespanName() {
        return timespanName;
    }

    public int getMonth() {
        return month;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public String getPrintStatus() {
        return printStatus;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setBuddhaId(int buddhaId) {
        this.buddhaId = buddhaId;
    }

    public void setBuddhaName(String buddhaName) {
        this.buddhaName = buddhaName;
    }

    public void setBuddhaNo(String buddhaNo) {
        this.buddhaNo = buddhaNo;
    }

    public void setBlessing(String blessing) {
        this.blessing = blessing;
    }

    public void setTimespanId(int timespanId) {
        this.timespanId = timespanId;
    }

    public void setTimespanName(String timespanName) {
        this.timespanName = timespanName;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public void setPrintStatus(String printStatus) {
        this.printStatus = printStatus;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(orderNo);
        dest.writeString(name);
        dest.writeString(phone);
        dest.writeInt(buddhaId);
        dest.writeString(buddhaName);
        dest.writeString(buddhaNo);
        dest.writeString(buddhaImg);
        dest.writeString(blessing);
        dest.writeInt(timespanId);
        dest.writeString(timespanName);
        dest.writeInt(month);
        dest.writeDouble(money);
        dest.writeString(orderStatus);
        dest.writeString(payStatus);
        dest.writeString(printStatus);
        dest.writeLong(startTime);
        dest.writeLong(endTime);
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
                "orderNo='" + orderNo + '\'' +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", buddhaId=" + buddhaId +
                ", buddhaName='" + buddhaName + '\'' +
                ", buddhaImg='" + buddhaImg + '\'' +
                ", buddhaNo='" + buddhaNo + '\'' +
                ", blessing='" + blessing + '\'' +
                ", timespanId=" + timespanId +
                ", timespanName='" + timespanName + '\'' +
                ", month=" + month +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", money=" + money +
                ", orderStatus='" + orderStatus + '\'' +
                ", payStatus='" + payStatus + '\'' +
                ", printStatus='" + printStatus + '\'' +
                '}';
    }
}
